<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<jsp:include page="/common.jsp"></jsp:include>
<script type="text/javascript">
	$(function(){
		selectItem('status','${t.status}','status');
	});
</script>
</head>
<body>
${title }
<form id="form" class="form-inline well" action="materielSupplies?save" method="post">
		<input type="hidden" name="id" value="${t.id }">
			<input type="hidden" name="client.id" value="${t.client.id }">
			<label><span class="span1">客户编号:</span>
				<input type="text" name="client.code" class="input-medium" value="${t.client.code }">
				<a class="icon-search" onclick="search_d('client/client?query','client.id,client.code,client.shortName,client.linkman,client.phone',1)"></a>
			</label>
			<label><span class="span1">简称:</span>
				<input type="text" name="client.shortName" class="input-medium" value="${t.client.shortName }">
			</label>
			<label><span class="span1">联系人:</span>
				<input type="text" name="client.linkman" class="input-medium" value="${t.client.linkman }">
			</label>
			<label><span class="span1">联系电话:</span>
				<input type="text" name="client.phone" class="input-medium" value="${t.client.phone }">
			</label>
			<input type="hidden" name="materiel.id" value="${t.materiel.id }">
			<label><span class="span1">品号:</span>
				<input type="text" name="materiel.code" class="input-medium" value="${t.materiel.code }">
				<a class="icon-search" onclick="search_d('storem/warehouse?queryMateriel','materiel.id,materiel.code,materiel.name,materiel.type,materiel.unit',1)"></a>
			</label>
			<label><span class="span1">品名:</span>
				<input type="text" name="materiel.name" class="input-medium" value="${t.materiel.name }">
			</label>
			<label><span class="span1">类别:</span>
				<input type="text" name="materiel.type" class="input-medium" value="${t.materiel.type }">
			</label>
			<label><span class="span1">单位:</span>
				<input type="text" name="materiel.unit" class="input-medium" value="${t.materiel.unit }">
			</label>
			<label><span class="span1">价格:</span>
				<input type="text" name="price" class="input-medium" value="${t.price }">
			</label>
			<label><span class="span1">状态:</span>
				<select name="status" id="status"></select>
			</label>
			<div class="control-group">
                <div class="controls">
                    <c:if test="${status==view}">
                        <button class="btn btn-primary" type="submit">保存</button>
                    </c:if>
                    <a class="btn btn-primary" onclick="go('client/materielSupplies?list')">返回</a>
                </div>
         	</div>
	</form>
	<jsp:include page="/foot.jsp"></jsp:include>
</body>
</html>